{include file="public/header" /}

<body>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="layui-card-body">
            <fieldset id="searchFieldset_currentTableRenderId" class="table-search-fieldset">
              <legend>条件搜索</legend>
              <form class="layui-form layui-form-pane form-search">
                <div class="layui-form-item layui-inline">
                  <label class="layui-form-label">关键字</label>
                  <div class="layui-input-inline">
                    <input type="text" name="title" placeholder="搜索商行名称" value="{:input('get.title')}"
                      autocomplete="off" class="layui-input" />
                  </div>
                </div>
                <div class="layui-form-item layui-inline">
                  <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="sreach">
                    搜索
                  </button>
                </div>
              </form>
            </fieldset>
          </div>
          <div class="layui-card-body layui-row layui-col-space10">
            <button class="layui-btn layui-bg-cyan layui-btn-sm" onclick="open_add('添加商行','user_edit')">
              添加商行
            </button>
            共有数据：<strong id="count">{$list->total()}</strong> 条
          </div>
          <div class="layui-table-body layui-table-main">
            <table class="layui-table">
              <thead>
                <tr>
                  <th>
                    <div class="layui-table-cell">ID</div>
                  </th>
                  <th>
                    <div class="layui-table-cell">商行名称</div>
                  </th>
                  <th>
                    <div class="layui-table-cell">操作</div>
                  </th>
                </tr>
              </thead>
              <tbody>
                {foreach $list as $v}
                <tr>
                  <td>
                    <div class="layui-table-cell">{$v.id}</div>
                  </td>
                  <td>
                    <div class="layui-table-cell">{$v.name}</div>
                  </td>
                  <td class="layui-table-col-special">
                    <div class="layui-table-cell">
                      <a title="编辑" onclick="open_add('编辑','/firm/user_edit?id={$v.id}')" href="javascript:;"
                        class="layui-btn layui-btn-sm">
                        编辑
                      </a>
                      <a title="删除" onclick="open_dels(this,'/firm/user_del','{$v.id}')" href="javascript:;"
                        class="layui-btn-danger layui-btn layui-btn-sm">
                        删除
                      </a>
                    </div>
                  </td>
                </tr>
                {/foreach}
              </tbody>
            </table>
          </div>
          <div class="layui-card-body">
            <div class="page">{$list->render()|raw}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
  {include file="public/footer"}
</body>